﻿@model ArticleWeb.Models.ArticleCategory

@{
    ViewBag.Title = "添加分类";
}
@using (Html.BeginForm("create", "articlecategories", FormMethod.Post, htmlAttributes: new { lay_filter = "create" }))
{
    @Html.AntiForgeryToken()
    <input type="hidden" name="parentId" value="@Request["parentId"]" />
    <div class="layui-form">
        <h4>添加分类</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="layui-form-item">
            <label class="layui-form-label">名称</label>
            <div class="layui-input-inline">
                @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "layui-input", lay_verify = "required" } })
                @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="submit" lay-submit lay-filter="create" value="确定" class="layui-btn layui-btn-primary" />
                @Html.ActionLink("返回列表", "Index", null, new { @class = "layui-btn layui-btn-primary" })
            </div>
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    <script>
        app.use('articlecategory/create');

    </script>
}
